package com.along.currentlimiting.aop.controller;

import com.along.currentlimiting.aop.interfacee.RateLimit;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * @Author: liujinyi
 * @DateTime: 2025/2/17 17:50
 */
@RestController
public class AOPController {

    @RateLimit(value = 2) // 每秒允许2个请求
    @GetMapping("/AOPlimited")
    public String limitedEndpoint() {
        return "Request allowed";
    }

}
